A. Field of the Invention
The invention is generally related to a module and method for interfacing analog/digital converting means and JPEG compression means, and especially to a module and method which complies with JPEG compression format without having to use an extra memory device originally required by JPEG compression means.
B. Description of the Prior Art
JPEG (Joint Photographic Experts Group) graphic images refer to images compressed following the set of compression algorithms defined by the International Standard Organization for still image compression standard. Since the JPEG algorithm (ITU-T Rec.T.81/ISO/IEC 10918-1) does not permit the modification of the coding parameters in the middle of the encoding of a single image. Hence, any JPEG compliant rate control scheme has to process an input image at least twice. One pass is to assess the complexity of the image and the other to perform the actual coding.
Currently JPEG algorithms are implemented as Integrated Circuits by hardware vendors for still image compression in the application for a scanner, or even a host computer to increase the speed of image compression and decompression. FIG. 1 illustrates a functional block diagram for a conventional JPEG compression device. Refer to FIG. 1, the JPEG compression means 12, which is an integrated circuit, can receive the digital image data output from a memory device 15. The memory device 15 can be a random access memory or any memory device. The memory device 15 receives the data output from an analog/digital converter 11.
Since JPEG compliant rate control scheme has to process an input image at least twice, and the data rates of compression and transmission are different, so the JPEG compression device 12 has a built-in memory device 13 and an extra memory device 14, usually a RAM, for temporary storing the image data while compressing. Take a general JPEG compression algorithm as an example, the basic compression unit is an image block of 8xc3x978 pixels. Accordingly, the size of the memory device 13 can store 8xc3x978 pixels at one time. On the other hand, the image data in the memory device 15 is transmitted to the memory device 14 line by line in a sequential order. As soon as the memory device 14 is full, the image data will be transmitted to the memory device 13 as an image block each time for image compression. The disadvantage for this approach is that an extra memory 14 is required to comply with the compression unit of the memory device 13. For the concern of cost and efficiency, it is desirable that the extra memory 14 is to be omitted.
Accordingly, it is an object of the present invention to provide a module and method for interfacing an analog/digital converter and a JPEG compression means which involves in a memory management so as to save an extra memory device originally required by JPEG compression means.
In accordance with the invention, the invention applies an interface module for receiving the digital image data output of an analog/digital converter and transmitting the digital image data output to the JPEG compression device when the image data output is determined to be compressed. The interface module comprises a read control device, an output control device and a memory device. The read control device reads a predetermined number of image lines from the data output of the analog/digital converter and stores these image data in a memory device. The memory device can save the same number of the image lines as the memory device built-in the JPEG compression device. If the compression unit is an 8xc3x978 image block, then the memory device can store 8 lines of image data. After reading the predetermined number of lines of image data, the read control device will generate a control signal to the output control device for reading an image block from the memory device in a sequential order and sequentially send each of the image block to the JPEG compression device. Since the image block is of the same size of the compression unit required by the JPEG compression device, therefore the image block can be directly transmitted to the JPEG compression device for data compression without having to access the extra memory device. Consequently, the cost on the extra memory can be saved.